package com.javablog.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.Set;

@Data
public class ArticleDto {
    
    private Long id;
    
    @NotBlank(message = "标题不能为空")
    @Size(min = 3, max = 100, message = "标题长度必须在3到100个字符之间")
    private String title;
    
    @NotBlank(message = "内容不能为空")
    private String content;
    
    private Long categoryId;
    
    private Set<Long> tagIds = new HashSet<>();
    
    private UserSummaryDto author;
    
    private CategoryDto category;
    
    private Set<TagDto> tags = new HashSet<>();
    
    private int views;
    
    private int likes;
    
    private int dislikes;
    
    private int commentCount;
    
    private LocalDateTime createdAt;
    
    private LocalDateTime updatedAt;
} 